<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/webflow.tld" prefix="webflow" %> 

<%@ page import="com.broadvision.bpmapp.docreview.Document" %>
<%@ page import="org.apache.commons.beanutils.PropertyUtils" %>

<html>
<head>
	<title><bean:message bundle="appCommonRes" key="uploadresult.startworkflow"/></title>
</head>

<body>

<jsp:useBean id="uploadView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/> 

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="100%">
<div class="app_pageTitle"><bean:message bundle="appCommonRes" key="uploadresult.startworkflow"/></div> 

<form action="<webflow:advance/>" method=post>

<div class="app_pageSubtitle">
  <span class="left"><bean:message bundle="appCommonRes" key="uploadresult.process"/></span>
  <span class="right">&nbsp;</span>
</div>

<table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Process Info">
<tr> 
  <td class="label" width="10%"><bean:message bundle="appCommonRes" key="uploadresult.name"/>:</td>
  <td class="labelField" width="90%"><bean:write name="uploadView" property="name"/></td>
</tr>

<tr> 
  <td class="label" width="10%"><bean:message bundle="appCommonRes" key="uploadresult.description"/>:</td>
  <td class="labelField" width="90%"><bean:write name="uploadView" property="description" /></td>
</tr>			  

<tr> 
  <td class="label" width="10%"><bean:message bundle="appCommonRes" key="uploadresult.type"/>:</td>
  <td class="labelField" width="90%"><bean:write name="uploadView" property="type" /></td>
</tr>

<tr> 
  <td class="label" width="10%"><bean:message bundle="appCommonRes" key="uploadresult.subtype"/>:</td>
  <td class="labelField" width="90%"><bean:write name="uploadView" property="subtype" /></td>
</tr>
</table>

<div class="app_pageSubtitle">
  <span class="left"><bean:message bundle="appCommonRes" key="uploadresult.document"/></span>
  <span class="right">&nbsp;</span>
</div>
		
<table class="dataTable" border="0" cellspacing="1" cellpadding="2" width="100%" summary="List of Uploaded Documents">
<tr class="listHeader"> 
  <th id="Name" align="left"><bean:message bundle="appCommonRes" key="uploadresult.name"/></th>
  <th id="Description" align="left"><bean:message bundle="appCommonRes" key="uploadresult.description"/></th>
  <th id="Filename" align="left" nowrap><bean:message bundle="appCommonRes" key="uploadresult.filename"/></th>
</tr>     
<logic:iterate id="doc" name="uploadView" property="documentList" indexId="index">  
<tr class="<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>">
  <td headers="Name"><bean:write name="doc" property="docName"/></td>
  <td headers="Description"><bean:write name="doc" property="docDesc"/></td>
  <td>
  <%
    // strip off the path name and just display the file name
    String str = (String)PropertyUtils.getSimpleProperty(doc, "filePath");
    int idx = str.lastIndexOf("/");
    if (idx == -1) {
  %>
  <%= str %>
  <% } else { %>
  <%= str.substring(idx+1, str.length()) %>
  <% } %>
  </td>
</tr>
</logic:iterate>
</table>

<div class="pageButtonWrap" align="right">
<input hspace="40" type="submit" name="Submit" class="pageButton" value="<bean:message bundle='appCommonRes' key='uploadresult.startworkflow'/>">
</div>

</form>
</td>
</tr>
</table>
      
</body>
</html>
